package com.treehouse.rpgdefender.component;

import org.newdawn.slick.Image;

import com.artemis.Component;

/**
 * Component class containing image data.
 * 
 * @author Julian Biermann
 * @version 26.02.2013 09:39:45 v1.0
 * 
 */
public class Sprite extends Component {

	private Image texture;

	/**
	 * Initializes the sprite with a given image texture.
	 * 
	 * @param texture
	 */
	public Sprite(Image texture) {
		this.texture = texture;
	}

	/**
	 * @return texture as Image
	 */
	public Image getTexture() {
		return texture;
	}

	/**
	 * Indicates if the sprite has been loaded.
	 * 
	 * @return Boolean value
	 */
	public boolean isLoaded() {
		if (this.texture == null)
			return false;
		return true;
	}
}
